<%@ page import="java.util.List" %>
<%@ page import="com.google.appengine.api.datastore.*" %>
<%
	Query query = new Query("__BlobInfo__");
	DatastoreService datastoreService = DatastoreServiceFactory.getDatastoreService();
	PreparedQuery pq = datastoreService.prepare(query); 
	List<Entity> list = pq.asList(FetchOptions.Builder.withLimit(10));
%>
<html>
<head> 
	<title>Download</title> 
	<meta name="viewport" content="width=device-width, initial-scale=1"> 
	<link rel="stylesheet" href="css/jquery.mobile-1.0.1.min.css" />
	<script src="js/jquery.js"></script>
	<script src="js/jquery.mobile-1.0.1.min.js"></script>
</head> 
<body>
<div data-role="page" id="main">

	<div data-role="header"  data-theme="b" data-fullscreen="true" data-position="fixed">
		<h1>Download</h1>
	</div>
	<div data-role="content">	
		<ul data-role="listview" data-inset="false" data-filter="true" >
<%

	for (Entity item:list) {
		String key = item.getKey().getName();
		String name = String.valueOf(item.getProperty("filename"));
%>		
			<li><a href="download?key=<%=key%>"><%=name%></a></li>
<%
	}
%>		
		</ul>		
	</div>
	
	<div data-role="footer" data-fullscreen="true" data-position="fixed">
	</div>

</div>

</body>
</html>